One of the examples of this kind of related arts is disclosed in Japanese Patent Laying-open No. 63-132295 [G10H1/00, 1/053] (document 1) laid-open on Jun. 4, 1988. According to this document 1, three acceleration sensors are attached to one end part of a drumstick, and acceleration in three directions of X, Y, Z is detected. In addition, sounds of different musical instruments are assigned corresponding to each direction. Accordingly, by detecting a swinging motion from an output of the acceleration sensor, the sound of the corresponding instrument can be outputted.
Also, another example of the related art is disclosed in Japanese Patent Laying-open No. 63-192096 [G10H1/00, 1/053] (document 2) laid-open on Aug. 9, 1988. According to this document 2, an angle detection means is incorporated into a grip part of a stick. Based on an on/off state of a plurality of mercury switches constituting the angle detection means, an angle formed by the angle detection means with respect to the ground, specifically, a swing-up angle of the stick is detected, and pitch data corresponding to a detection result thus obtained is outputted to a musical sound signal generating circuit.
However, a technique recited in the document 1 involves a problem that only one tone can be outputted in one swing direction and therefore a swinging attitude of a swinging instrument such as a stick is not associated with the output of the tone. This unfavorably invites a monotonous swing.
Further, the technique recited in the document 2 involves a problem that the swing-up angle of the stick (tilt of the stick) is detected by the mercury switches. This can not be a practical technique, when a danger caused by using mercury and a cost incurred therein are taken into consideration.
Therefore, it is a feature of certain exemplary embodiments to provide a novel storage medium storing sound output program, sound output apparatus and sound output control method.
Another feature of certain exemplary embodiments is to provide a storage medium storing sound output program, a sound output apparatus and a sound output control method capable of enjoying a sound outputted in accordance with a swinging motion by a user.
For resolution of the above mentioned problems, certain exemplary embodiments employ such a structure described below. The reference numerals and supplementary explanations, etc. in parentheses here indicate merely one example of correspondence with the exemplary embodiments described later for aid of understanding, and imposes no limitations on the certain exemplary embodiments described herein.
A storage medium storing sound output program according to certain exemplary embodiments stores the sound output program of a sound output apparatus comprising an operating means including an acceleration sensor. The sound output program causes a processor of a sound output apparatus to function as a swinging motion detection means, a swinging motion end determination means, a posture detection means, and a sound output means. The swinging motion detection means detects a swinging motion of the operating means based on an output of the acceleration sensor. The motion end determination means determines whether or not the swinging motion is ended based on the output of the acceleration sensor after the swinging motion is detected by the swinging motion detection means. The posture detection means detects a posture of the operating means based on the output of the acceleration sensor when the swinging motion end determination means determines that the swinging motion is ended. The sound output means outputs a sound based on tone data stored in storage means in accordance with a detection result of the posture detection means.
Specifically, the sound output program is incorporated into a sound output apparatus (12) comprising an operating means (22) including an acceleration sensor (74). The sound output program causes a processor (36) of a sound output apparatus to function as a swinging motion detection means (36, S23, S43, S61, S63, S65, S67, S69, S95, S99), a swinging motion end determination means (36, S27, S47, S69, S105), and a posture detection means (36, S71), and a sound output means (36, S29, S49, S73, S75, S109, S111). The swinging motion detection means detects the swinging motion of the operating means based on the output of the acceleration sensor. For example, the swinging motion in a lateral direction (right and left) or the swinging motion in a vertical direction (upper and lower) is detected. The motion end determination means determines whether or not the swinging motion is ended based on the output of the acceleration sensor, after the swinging motion is detected by the swinging motion detection means. For example, variation of the output from the acceleration sensor is detected, and when the direction of the variation is not changed, the motion end determination means determines that the swinging motion is not ended. Meanwhile, when there is no variation of the output of the acceleration sensor, namely, when the output of the acceleration sensor shows a fixed value or almost the fixed value, the motion end determination means determines that the swinging motion is ended. The posture detection means detects the posture of the operating means based on the output of the acceleration sensor when the swinging motion end determination means determines that the swinging motion is ended. For example, a position (height) of the operating means during swinging motion is detected. The sound output means outputs the sound based on tone data stored in the storage means in accordance with a detection result of the posture detection means. For example, the sound in accordance with the position of the operating means is outputted.
According to certain exemplary embodiments, since the sound is outputted in accordance with a swinging motion of the operating means, a user can enjoy the sound outputted in accordance with the swinging motion by the user. In addition, since the sound is outputted in accordance with a swinging attitude of the operating means, a user can experience a sense as if he/she plays an actual musical instrument.
According to an exemplary embodiment, the acceleration sensor serves as a multiaxial acceleration sensor, and the processor further causes the sound output program to function as a direction determination means for determining a direction of the swinging motion based on the acceleration in directions of two axes of the multiaxial acceleration sensor. Moreover, the posture detection means includes a vertical directional inclination detection means for detecting an inclination formed by the operating means and a horizontal surface in a vertical direction based on the acceleration in a direction of the axis perpendicularly crossing the two axes, when the determination result of the direction determination means shows the vertical direction, and the sound output means reads from the storage means the tone data corresponding to the position in the vertical direction, in accordance with the inclination thus detected by the vertical directional inclination detection means, the acceleration sensor specifically serves as the multiaxial acceleration sensor. The sound output program causes the processor of the sound output apparatus to further function as a direction determination means (36, S21, S23, S25, S41, S43, S45, S61, S63, S65, S67, S69). The direction determination means determines the direction of the swinging motion based on the acceleration in directions of the two axes (x-axis and y-axis of 22) of the multiaxial acceleration sensor. The vertical directional inclination detection means (36, S71) detects the inclination in the vertical direction formed by the operating means and the horizontal surface based on the acceleration in the direction of the axis (z-axis) perpendicularly crossing the two axes (x-axis and y-axis), when the determination result of the direction determination means shows a vertical direction (“YES” in S69). The sound output means reads from the storage means the tone data corresponding to the position in the vertical direction in accordance with the inclination detected by the vertical directional inclination detection means. For example, when the operating means swings in the vertical direction, the position of the operating means in the vertical direction (height) is determined in accordance with the inclination of the operating means in a state of end of swinging, and the sound of the tone in accordance with the height is outputted. Namely, when the operating means swings in the vertical direction, it is possible to output the sound in accordance with the position of its end of swinging.
According to another exemplary embodiment, when the determination result of the direction determination means shows a right direction, the sound output means reads from the storage means the tone data in accordance with the right direction. Meanwhile, when the determination result of the direction determination means shows a left direction, the sound output means reads from the storage means the tone data in accordance with the left direction. Specifically, when the determination result of the direction determination means shows the right direction, the sound output means reads from the storage means the tone data in accordance with the right direction. Meanwhile, when the determination result of the direction determination means shows the left direction, the sound output means reads from the storage means the tone data in accordance with the left direction. Namely, by the sound output means, the sound in accordance with the swinging motion in the right direction or the swinging motion in the left direction is outputted. In this case, the posture of the end of swinging is of no relevance. Therefore, the processing by the posture detection means is not executed. Thus, it is possible to output the sound in accordance with the swinging attitude of the operating means which is divided into right and left.
According to one aspect of certain exemplary embodiments, the sound output apparatus further comprises a display means, and the sound output program causes the processor to function as a guidance screen display means for displaying a guidance screen to guide the swinging motion on a display means, and the direction shown by the determination result of the direction determination means corresponds to the direction in the guidance screen. Specifically, the sound output program causes the processor of the sound output apparatus to further function as a guidance screen display means (36, S3). The guidance screen display means displays on the display means a guidance screen (100) for guiding the swinging motion. The direction (vertical, right or left direction) shown by the determination result of the direction determination means corresponds to the direction in the guidance screen. For example, the upper, lower, left and right swinging motions correspond to the upper, lower, left and right sides on the guidance screen. Accordingly, for example, when an image of the musical instrument is displayed in the upper, lower, left and right sides on the guidance screen, a player can play a desired musical instrument by the swinging motion of the operating means by viewing the image of the musical instrument. Namely, the player can enjoy the sound in accordance with its swinging motion.
The sound output apparatus according to certain exemplary embodiments comprises the operating means including the acceleration sensor. Also, the sound output apparatus comprises the swinging motion detection means, the swinging motion end determination means, the posture detection means, and the sound output means. The swinging motion detection means detects the swinging motion of the operating means based on the output of the acceleration sensor. The swinging motion end determination means determines whether or not the swinging motion is ended based on the output of the acceleration sensor, after the swinging motion is detected by the swinging motion detection means. When the swinging motion end determination means determines that the swinging motion is ended, the posture detection means detects the posture of the operating means based on the output of the acceleration sensor. The sound output means outputs the sound based on the tone data stored in the storage means, in accordance with the detection result of the posture detection means.
According to the sound output apparatus of certain exemplary embodiments, in the same way as the storage medium storing sound output program as described above, a user can enjoy the sound outputted in accordance with the swinging motion by the user.
A sound output control method according to certain exemplary embodiments, which is the sound output control method of the sound output apparatus having the operating means including the acceleration sensor, comprises the steps of (a) detecting the swinging motion of the operating means based on the output of the acceleration sensor; (b) determining whether or not the swinging motion is ended based on the output of the acceleration sensor after the swinging motion is detected by step (a); (c) detecting the posture of the operating means based on the output of the acceleration sensor when determination in step (b) shows that the swinging motion is ended; and (d) outputting the sound based on the tone data stored in the storage means in accordance with the detection result of step (c).
According to the sound output control method of certain exemplary embodiments, in the same way as the storage medium storing sound output program as described above, a user can enjoy the sound outputted in accordance with the swinging motion by the user.
The above described features, aspects and advantages of the certain exemplary embodiments described herein will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.